package com.anhry.app.safety.manage.oa.struts.action;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.anhry.app.safety.manage.enterprise.bean.TbCorpInfo;
import com.anhry.app.safety.manage.enterprise.bean.TbCorpInfoView;
import com.anhry.app.safety.manage.enterprise.bean.TbCorpType;
import com.anhry.app.safety.manage.oa.bean.CountBean;
import com.anhry.app.safety.manage.oa.bean.TbOaCallMsg;
import com.anhry.app.safety.manage.oa.bean.TbOaCallMsgView;
import com.anhry.app.safety.manage.oa.bean.TbOaPersonCall;
import com.anhry.app.safety.manage.oa.bean.TbOaSystemCall;
import com.anhry.app.safety.manage.oa.struts.base.OABaseAction;
import com.anhry.app.safety.manage.system.bean.TbUser;
import com.anhry.app.safety.manage.system.bean.TbUserDept;
import com.anhry.app.safety.manage.system.bean.TbUserGrade;
import com.anhry.app.safety.manage.system.bean.vo.SystemBean;
import com.anhry.app.safety.util.DateFormater;
import com.anhry.app.safety.util.Loggers;
import com.anhry.app.safety.util.Page;
import com.anhry.app.safety.util.Util;
import com.anhry.app.safety.util.bean.YearBean;

/**
 * 
 * @author chen
 * @date 2012-8-20
 */
@Controller
@Scope("prototype")
@SuppressWarnings("unchecked")
public class CallAction extends OABaseAction {

	/**
	 * 
	 */
	private static Logger logger = Logger.getLogger(MailAction.class);

	private static final long serialVersionUID = 1L;

	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");

	SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");

	private List<TbOaPersonCall> perCallList;

	private List<TbOaCallMsgView> callMsgList;

	private String str_num;

	private String str_size;

	private String str_num1;

	private String str_size1;

	private String keyWord;
	
	private String cZcType;
	
	private String urls;

	private String search;

	private String keyTime;

	private String beginTime;

	private String endTime;

	private String callTime; // 提醒执行时间

	private String addUser; // 通知接收者（管理员）

	private String addCorp; // 通知接收者（企业）

	private String corpSelect; // 通知接收者（符合条件的企业）

	private String callContent; // 提醒内容

	private String noteDay; // 短信执行时间（天）

	private String noteHour; // 短信执行时间（小时）

	private String noteSec; // 短信执行时间（分钟）

	private String callNums; // 提醒次数

	private String callAtTime; // 提醒间隔时间

	private String callType; // 提醒类型0：不提醒1：消息2：短信息

	private Long callId;

	private Long id1;

	private Long id;

	private Long id2;

	private Long id3;

	private boolean editOk;

	private boolean deleOk;

	private String forward;

	private String isSend;

	private String ids;

	private TbOaPersonCall perCall;

	private List<TbUser> userNamesList;

	private List<TbCorpInfo> corpNamesList;

	private String isSends;

	private String forType;

	private TbOaCallMsg callMsg;

	private String readType;

	private List<TbOaCallMsg> msgUserList;// 收到提醒人列表

	private List<TbOaSystemCall> sysCallList;

	private TbOaSystemCall sysCall;

	private TbOaSystemCall sysCall2;

	private TbOaSystemCall sysCall3;

	private String callType2;

	private String callType3;

	private String endTime2;

	private String endTime3;

	private String callNums2;

	private String callNums3;

	private String callAtTime2;

	private String callAtTime3;

	private String callContent2;

	private String callContent3;

	private String tip;

	private String callTypes;// 提醒机制

	private String userUnit;// 提醒人单位

	private String userDept;// 提醒人部门

	private List<TbUserDept> deptList;//

	private String keyUser;// 提醒人

	private String tempUser;//

	private String isCorper;

	private String isCorper2;

	private String isCorper3;

	private String isLocked;

	private String isLocked2;

	private String isLocked3;

	private boolean userGrade;

	private CountBean ksNums;

	private CountBean hyNums;

	private CountBean sdNums;

	private String callSize;// 当前未读提醒数量

	private CountBean counts;// 本部门设置的提醒数量

	private String typeMax; // 企业类型大类

	private String typeMin; // 企业类型小类

	private String zyMax; // 专业监管部门大类

	private String zyMin; // 专业监管部门小类

	private String hyMax; // 行业监管部门大类

	private String hyMin; // 行业监管部门小类

	private String sdMax; // 企业所属属地大类

	private String sdMin; // 企业所属属地小类

	private String corpGr; // 企业级别

	private List<TbCorpInfoView> corpList; // 企业列表集合

	private List<TbCorpType> typeList; // 企业类型集合

	private List<TbUserDept> zyList; // 专业监管部门

	private List<TbUserDept> hyList; // 行业监管部门

	private List<TbUserDept> sdList; // 属地集合

	private List<YearBean> yearList;

	private String isUp;

	private String upYear;

	private String upQuarter;

	private String upType; // 上报类型:0年报1行业月报2属地月报

	// 新增属性
	private CountBean ksInNums;

	private CountBean hyInNums;

	private CountBean sdInNums;

	private CountBean userCallInNums;

	private List<TbUser> userList; // 用户列表

	private List<TbUserGrade> gradeList; // 用户级别列表

	private List zwList;

	private List roleList;

	private String cGrade;

	private String cUnit;

	private String cDept;

	private String cRole;

	private String cZw;

	private String cCounty;

	private String cHy;

	private String cMaxType;

	private String cMinType;

	// 系统提醒的已发提醒只有一个num和size属性不能完成要求，与查看页面中的num、size冲突
	private String num1;

	private String size1;

	/**
	 * 解码方法
	 * 
	 * @author zhangpeng
	 */
	private void decodeKey() {
		if (null == this.getSearch() && (keyWord != null && !"".equals(keyWord))) {
			try {
				keyWord = this.contextPvd.decode(keyWord);
				keyUser = this.contextPvd.decode(keyUser);// 提醒汇总页面提醒人关键字
			} catch (Exception e) {
				e.printStackTrace();
				logger.error("keyword解码异常：" + e.getMessage());
			}
		}
	}

	/**
	 * 提醒主页
	 * 
	 * @return
	 */
	public String callIndex() {
		TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
		Long userGrade = user.getTbUserRole().getId();
		try {
			// 本人未读消息数量
			List callList = this.callService.loadCallMsgList(null, null, null, user, "0", 0, 0);
			String callSize = "0";
			if (null != callList) {
				callSize = callList.get(0).toString();
			}
			this.setCallSize(callSize);
			if ("0".equals(userGrade) || "1".equals(userGrade) || "2".equals(userGrade) || ("4".equals(userGrade) && "6".equals(userDept))) {// 如果是管理员，安办，或者信息科
				this.setUserGrade(true);
			}
			this.setResult("welcome_xitongtixing");
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction:callIndex()异常：" + e);
		}
		return ERROR;
	}

	/**
	 * 个人提醒列表
	 * 
	 * @return
	 */
	public String perCallList() {
		TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
		try {
			decodeKey();
			List callSize = this.callService.loadPerCallList(keyWord, this.getBeginTime(), this.getEndTime(), user, this.getForward(), this.getForward(), 0, 0);
			if (null != callSize) {
				rowCount = Integer.parseInt(callSize.get(0).toString());
			}
			this.setPagingParameters();
			this.setPerCallList(this.callService.loadPerCallList(keyWord, this.getBeginTime(), this.getEndTime(), user, this.getForward(), this.getForward(), page.getStartRow(), page.getSize()));
			if ("0".equals(this.getForward())) {
				this.setResult("call_per_list");
			} else if ("1".equals(this.getForward())) {
				this.setResult("call_per_sendList");
			}
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中perCallList()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 收到的提醒
	 * 
	 * @return
	 */
	public String perCallInList() {
		TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
		try {
			decodeKey();
			List callSize = this.callService.loadCallMsgList(keyWord, this.getBeginTime(), this.getEndTime(), user, null, 0, 0);
			if (null != callSize) {
				rowCount = Integer.parseInt(callSize.get(0).toString());
			}
			// 设置page属性
			setPagingParameters();
			this.setCallMsgList(this.callService.loadCallMsgList(keyWord, this.getBeginTime(), this.getEndTime(), user, null, page.getStartRow(), page.getSize()));
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中perCallList()方法：" + e.getMessage());
		}
		this.setResult("call_per_inList");
		return SUCCESS;
	}

	/**
	 * 收到提醒详细信息查看
	 * 
	 * @return
	 */
	public String perCallInShow() {
		TbOaCallMsg msg = null;
		try {
			this.setKeyWord(this.contextPvd.encode(this.contextPvd.decode(this.getKeyWord())));
			if (null != this.getId() && !"".equals(this.getId())) {
				msg = (TbOaCallMsg) this.utilService.getObjectById(TbOaCallMsg.class, this.getId());
				if (null != msg) {
					if ("0".equals(msg.getIsRead())) {
						msg.setIsRead("1");
						msg.setReadTime(new Date());
						this.utilService.update(msg);
					}
					this.setCallMsg(msg);
					this.setResult("call_per_inshow");
					return SUCCESS;
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中perCallList()方法：" + e.getMessage());
		}

		return ERROR;
	}

	/**
	 * 跳转到个人提醒新建页面
	 * 
	 * @return
	 */
	public String toPerCallUp() {
		this.setKeyWord(this.contextPvd.encode(this.contextPvd.decode(this.getKeyWord())));
		this.setResult("call_per_up");
		return SUCCESS;
	}

	/**
	 * 个人提醒的添加修改
	 * 
	 * @return
	 */
	public String perCallSaveOrUpdate() {
		TbOaPersonCall pcall = null;
		String corpIds = "";
		TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
		try {
			if (null != this.getCallId() && !"".equals(this.getCallId())) {// 修改
				pcall = (TbOaPersonCall) this.utilService.getObjectById(TbOaPersonCall.class, this.getCallId());
				if (null != pcall) {
					pcall.setCallAddsUser(this.getAddUser());
					pcall.setCallTime(sdf.parse(this.getCallTime()));//				
					pcall.setCallContent(this.getCallContent());
					pcall.setCallType(this.getCallType());
					pcall.setIsCorper(this.getIsCorper());
					Calendar cd = Calendar.getInstance();
					cd.setTime(sdf.parse(this.getCallTime()));
					int year = cd.get(Calendar.YEAR);
					pcall.setCallYear(String.valueOf(year)); // 年度
					int quarter = DateFormater.getQuarter(cd);
					pcall.setCallQuarter(String.valueOf(quarter));// 季度
					int month = cd.get(Calendar.MONTH) + 1;
					pcall.setCallMonth(String.valueOf(month));
					if ("0".equals(this.getCallType())) {// 如果选择的信息
						pcall.setNoteDay("0");
						pcall.setNoteHour("0");
						pcall.setNoteSec("0");
						pcall.setCallNums("0");
						pcall.setCallAtTime("0");
					} else {
						pcall.setNoteDay(this.getNoteDay());
						pcall.setNoteHour(this.getNoteHour());
						pcall.setNoteSec(this.getNoteSec());
						pcall.setCallNums(this.getCallNums());
						pcall.setCallAtTime(this.getCallAtTime());
					}
					// 接收者（企业）
					Set corpSet = new HashSet();
					if (null != this.getAddCorp() && !"".equals(this.getAddCorp())) {
						String[] cos = this.getAddCorp().split(",");
						for (String c : cos) {
							corpSet.add(c);
						}
					}
					String strr[] = null;
					if (null != corpSet && corpSet.size() > 0) {
						strr = (String[]) corpSet.toArray(new String[0]);// 将set中元素放入数组中
						for (String st : strr) {
							corpIds += st + ",";
						}
						corpIds = corpIds.substring(0, corpIds.length() - 1);
					}
					pcall.setCallAddsCorp(corpIds);
					if ("0".equals(pcall.getIsSend())) {// 还未发送
						// 删除关系表中的数据
						List<TbOaCallMsg> mList = (List<TbOaCallMsg>) this.utilService.getHqlQuery("from TbOaCallMsg msg left join fetch msg.tbPersonCall where msg.tbPersonCall.id='" + pcall.getId() + "'");
						if (null != mList && mList.size() > 0) {
							for (int i = 0; i < mList.size(); i++) {
								TbOaCallMsg mg = mList.get(i);
								mg.setIsDele("1");
								this.utilService.update(mg);
							}
						}
						this.utilService.merge(pcall);
					} else {
						pcall.setCallDate(new Date());
						pcall.setIsSend("0");
						this.utilService.save(pcall);
					}
					// 直接将提醒将要发送消息到用户保存到消息表(提醒触发后就不用再发送消息，直接将提醒改为已发送即可)
					// 接收者（管理员）关系表
					if (null != this.getAddUser() && !"".equals(this.getAddUser())) {
						String[] addu = this.getAddUser().split(",");
						TbOaCallMsg msg;
						for (String st : addu) {
							msg = new TbOaCallMsg();
							msg.setIsDele("0");
							msg.setIsRead("0");
							msg.setMsgContent(pcall.getCallContent());
							msg.setMsgTime(pcall.getCallTime());// 消息发送时间
							msg.setMsgTitle(pcall.getCallContent());
							msg.setMsgType("0");// 个人消息
							msg.setMsgUser(pcall.getTbUser());
							msg.setNoteAtTime(pcall.getCallAtTime());
							msg.setNoteNums(pcall.getCallNums());// 应发短信次数
							msg.setNoteNum("0");// 已发短息次数
							msg.setTbPersonCall(pcall);
							msg.setTbUser((TbUser) this.utilService.getObjectById(TbUser.class, Long.parseLong(st)));
							msg.setUserTypes("0");
							msg.setVersion("1.0");
							msg.setMsgYear(String.valueOf(year));
							msg.setMsgQuarter(String.valueOf(quarter));
							msg.setMsgMonth(String.valueOf(month));
							msg.setCallType(pcall.getCallType());
							this.utilService.save(msg);
						}
					}
					// 接收者（企业）关系表
					if (null != corpIds && corpIds.length() > 0) {
						TbOaCallMsg msg;
						String[] addc = corpIds.split(",");
						for (String st : addc) {
							msg = new TbOaCallMsg();
							msg.setIsDele("0");
							msg.setIsRead("0");
							msg.setMsgContent(pcall.getCallContent());
							msg.setMsgTime(pcall.getCallTime());// 消息发送时间
							msg.setMsgTitle(pcall.getCallContent());
							msg.setMsgType("0");// 个人消息
							msg.setMsgUser(pcall.getTbUser());
							msg.setNoteAtTime(pcall.getCallAtTime());
							msg.setNoteNums(pcall.getCallNums());// 应发短信次数
							msg.setNoteNum("0");// 已发短息次数
							msg.setTbPersonCall(pcall);
							msg.setTbCorpInfo((TbCorpInfo) this.utilService.getObjectById(TbCorpInfo.class, Long.parseLong(st)));
							msg.setUserTypes("1");
							msg.setVersion("1.0");
							msg.setMsgYear(String.valueOf(year));
							msg.setMsgQuarter(String.valueOf(quarter));
							msg.setMsgMonth(String.valueOf(month));
							msg.setIsCorper(this.getIsCorper());
							msg.setCallType(pcall.getCallType());
							this.utilService.save(msg);
						}
					}
					this.setForward("0");
					perCallList();
					tip = "修改成功!";
					return SUCCESS;
				}
			} else {// 添加
				pcall = new TbOaPersonCall();
				pcall.setCallAddsUser(this.getAddUser());
				pcall.setCallContent(this.getCallContent());
				pcall.setCallDate(new Date());// 提醒添加时间
				pcall.setCallTime(sdf.parse(this.getCallTime()));//
				pcall.setCallType(this.getCallType());
				pcall.setIsDele("0");
				pcall.setIsDrop("0");
				pcall.setIsSend("0");
				pcall.setIsCorper(this.getIsCorper());
				Calendar cd = Calendar.getInstance();
				int year = cd.get(Calendar.YEAR);
				pcall.setCallYear(String.valueOf(year)); // 年度
				int quarter = DateFormater.getQuarter(cd);
				pcall.setCallQuarter(String.valueOf(quarter));// 季度
				int month = cd.get(Calendar.MONTH) + 1;
				pcall.setCallMonth(String.valueOf(month));
				if ("0".equals(this.getCallType())) {// 如果选择的信息
					pcall.setNoteDay("0");
					pcall.setNoteHour("0");
					pcall.setNoteSec("0");
					pcall.setCallNums("0");
					pcall.setCallAtTime("0");
				} else {
					pcall.setNoteDay(this.getNoteDay());
					pcall.setNoteHour(this.getNoteHour());
					pcall.setNoteSec(this.getNoteSec());
					pcall.setCallNums(this.getCallNums());
					pcall.setCallAtTime(this.getCallAtTime());
				}
				pcall.setTbUser(user);
				pcall.setVersion("1.0");
				// 接收者（企业）
				Set corpSet = new HashSet();
				if (null != this.getAddCorp() && !"".equals(this.getAddCorp())) {
					String[] cos = this.getAddCorp().split(",");
					for (String c : cos) {
						corpSet.add(c);
					}
				}
				String strr[] = null;
				if (null != corpSet && corpSet.size() > 0) {
					strr = (String[]) corpSet.toArray(new String[0]);// 将set中元素放入数组中
					for (String st : strr) {
						corpIds += st + ",";
					}
					corpIds = corpIds.substring(0, corpIds.length() - 1);
				}
				pcall.setCallAddsCorp(corpIds);
				this.utilService.save(pcall);
				// 短信
				// 直接将提醒将要发送消息到用户保存到消息表(提醒触发后就不用再发送消息，直接将提醒改为已发送即可)
				// 接收者（管理员）关系表
				if (null != this.getAddUser() && !"".equals(this.getAddUser())) {
					TbOaCallMsg msg;
					String[] addu = this.getAddUser().split(",");
					for (String st : addu) {
						msg = new TbOaCallMsg();
						msg.setIsDele("0");
						msg.setIsRead("0");
						msg.setMsgContent(pcall.getCallContent());
						msg.setMsgTime(pcall.getCallTime());// 消息发送时间
						msg.setMsgTitle(pcall.getCallContent());
						msg.setMsgType("0");// 个人消息
						msg.setMsgUser(pcall.getTbUser());
						msg.setNoteAtTime(pcall.getCallAtTime());
						msg.setNoteNums(pcall.getCallNums());// 应发短信次数
						msg.setNoteNum("0");
						msg.setTbPersonCall(pcall);
						msg.setTbUser((TbUser) this.utilService.getObjectById(TbUser.class, Long.parseLong(st)));
						msg.setUserTypes("0");
						msg.setVersion("1.0");
						msg.setMsgYear(String.valueOf(year));
						msg.setMsgQuarter(String.valueOf(quarter));
						msg.setMsgMonth(String.valueOf(month));
						msg.setCallType(pcall.getCallType());
						this.utilService.save(msg);
					}
				}
				// 接收者（企业）关系表
				if (null != corpIds && corpIds.length() > 0) {
					TbOaCallMsg msg;
					String[] addc = corpIds.split(",");
					for (String st : addc) {
						msg = new TbOaCallMsg();
						msg.setIsDele("0");
						msg.setIsRead("0");
						msg.setMsgContent(pcall.getCallContent());
						msg.setMsgTime(pcall.getCallTime());// 消息发送时间
						msg.setMsgTitle(pcall.getCallContent());
						msg.setMsgType("0");// 个人消息
						msg.setMsgUser(pcall.getTbUser());
						msg.setNoteAtTime(pcall.getCallAtTime());
						msg.setNoteNums(pcall.getCallNums());// 应发短信次数
						msg.setNoteNum("0");
						msg.setTbPersonCall(pcall);
						msg.setTbCorpInfo((TbCorpInfo) this.utilService.getObjectById(TbCorpInfo.class, Long.parseLong(st)));
						msg.setUserTypes("1");
						msg.setVersion("1.0");
						msg.setMsgYear(String.valueOf(year));
						msg.setMsgQuarter(String.valueOf(quarter));
						msg.setMsgMonth(String.valueOf(month));
						msg.setIsCorper(this.getIsCorper());
						msg.setCallType(pcall.getCallType());
						this.utilService.save(msg);
					}
				}
				tip = "添加成功！";
				perCallList();
				return SUCCESS;
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中perCallSaveOrUpdate()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 删除提醒
	 * 
	 * @return
	 */
	public String callDele() {
		try {
			TbOaPersonCall call2 = null;
			this.setKeyWord(this.contextPvd.encode(this.contextPvd.decode(this.getKeyWord())));
			if (null != this.getIds() && !"".equals(this.getIds())) {
				String[] arr = this.getIds().split(",");
				for (String str : arr) {
					call2 = (TbOaPersonCall) this.utilService.getObjectById(TbOaPersonCall.class, Long.parseLong(str));
					if (null != call2) {
						if ("0".equals(this.getForward())) {// 已设置提醒
							List<TbOaCallMsg> msgList = (List<TbOaCallMsg>) this.utilService.getHqlQuery("from TbOaCallMsg msg left join fetch msg.tbPersonCall where msg.tbPersonCall.id=" + str+ "");
							if (null != msgList && msgList.size() > 0) {
								for (int i = 0; i < msgList.size(); i++) {
									TbOaCallMsg msg = msgList.get(i);
									msg.setIsDele("1");
									this.utilService.merge(msg);
								}
							}
							call2.setIsDele("1");
							this.utilService.merge(call2);
						} else {// 已发送提醒
							call2.setIsDele("1");
						}
						this.utilService.merge(call2);
					}
				}
				tip = "删除成功！";
				return this.perCallList();
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中callDele()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 已收到提醒删除
	 * 
	 * @return
	 */
	public String callMsgDele() {
		try {
			this.setKeyWord(this.contextPvd.encode(this.contextPvd.decode(this.getKeyWord())));
			if (null != this.getIds() && !"".equals(this.getIds())) {
				String[] arr = this.getIds().split(",");
				for (String str : arr) {
					TbOaCallMsg call = (TbOaCallMsg) this.utilService.getObjectById(TbOaCallMsg.class, Long.parseLong(str));
					if (null != call) {
						call.setIsDele("1");
						this.utilService.update(call);
					}
				}
				tip = "删除成功！";
				return this.perCallInList();
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中callDele()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 跳转到提醒查看页面
	 * 
	 * @return
	 */
	public String perCallShow() {
		TbOaPersonCall call = null;
		try {
			this.setKeyWord(this.contextPvd.encode(this.contextPvd.decode(this.getKeyWord())));
			if (null != this.getId() && !"".equals(this.getId())) {
				call = (TbOaPersonCall) this.utilService.getObjectById(TbOaPersonCall.class, this.getId());
				this.setPerCall(call);
				// 被提醒人（管理员）
				if (null != call.getCallAddsUser() && !"".equals(call.getCallAddsUser())) {
					this.setUserNamesList((List<TbUser>) this.utilService.getHqlQuery("from TbUser user where user.id in(" + call.getCallAddsUser() + ")"));
				}
				// 被提醒人（企业）
				if (null != call.getCallAddsCorp() && !"".equals(call.getCallAddsCorp())) {
					this.setCorpNamesList((List<TbCorpInfo>) this.utilService.getHqlQuery("from TbCorpInfo corp where corp.id in(" + call.getCallAddsCorp() + ")"));
				}
				if ("0".equals(this.getForType())) {
					this.setResult("call_per_show");
					return SUCCESS;
				} else if ("1".equals(this.getForType())) {
					this.setResult("call_per_edit");
					return SUCCESS;
				}

			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中perCallShow()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 查看对方阅读状态
	 * 
	 * @return
	 */
	public String callReadList() {
		try {
			this.setKeyWord(this.contextPvd.encode(this.contextPvd.decode(this.getKeyWord())));
			if (null != this.getId() && !"".equals(this.getId())) {
				List callSize = this.callService.loadCallReadList(this.getId(), this.getReadType(), 0, 0);
				if (null != callSize) {
					rowCount = Integer.parseInt(callSize.get(0).toString());
				}
				this.setPagingParameters();
				this.setMsgUserList(this.callService.loadCallReadList(this.getId(), this.getReadType(), page.getStartRow(), page.getSize()));
				this.setResult("call_per_read_list");
				return SUCCESS;
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("CallAction中callReadList()方法：" + e);
		}
		return ERROR;
	}

	/**
	 * 系统提醒展示
	 */
	public String sysCallShow() {
		TbOaSystemCall sys = null;
		TbOaSystemCall sys2 = null;
		TbOaSystemCall sys3 = null;
		try {
			if (null != this.getCallId() && !"".equals(this.getCallId())) {
				if ((this.getCallId() == 1)) {// 企业分类分级
					sys = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, 1L);
					sys2 = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, 2L);
					sys3 = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, 3L);
					this.setSysCall(sys);
					this.setSysCall2(sys2);
					this.setSysCall3(sys3);
					this.setResult("call_sys_corp_fj");
					return SUCCESS;
				} else if ((this.getCallId() == 2)) {// 企业复查
					sys = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, 4L);
					sys2 = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, 5L);
					this.setSysCall(sys);
					this.setSysCall2(sys2);
					this.setResult("call_sys_corp_fc");
					return SUCCESS;
				} else if ((this.getCallId() == 3)) {// 特种设备
					sys = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, 6L);
					this.setSysCall(sys);
					this.setResult("call_sys_tz");
					return SUCCESS;
				} else if ((this.getCallId() == 4)) {// 企业自查自报
					sys = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, 7L);
					this.setSysCall(sys);
					this.setResult("call_sys_corp_zc");
					return SUCCESS;
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.info("CallAction类中sysCallShow()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 系统提醒修改
	 * 
	 * @return
	 */
	public String sysSendOrUpdate() {
		TbOaSystemCall sys = null;
		TbOaSystemCall sys2 = null;
		TbOaSystemCall sys3 = null;
		try {
			if (null != this.getCallId() && !"".equals(this.getCallId())) {
				if (null != this.getId1() && !"".equals(this.getId1())) {
					sys = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, this.getId1());
					if (null != sys) {
						sys.setEndTime(this.getEndTime());
						sys.setCallType(this.getCallType());
						sys.setCallNums(this.getCallNums());
						sys.setCallAtTime(this.getCallAtTime());
						sys.setCallContent(this.getCallContent());
						sys.setIsCorper(this.getIsCorper());
						sys.setIsLocked(this.getIsLocked());
						this.utilService.update(sys);
					}
				}
				if (null != this.getId2() && !"".equals(this.getId2())) {
					sys2 = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, this.getId2());
					if (null != sys2) {
						sys2.setEndTime(this.getEndTime2());
						sys2.setCallType(this.getCallType2());
						sys2.setCallNums(this.getCallNums2());
						sys2.setCallAtTime(this.getCallAtTime2());
						sys2.setCallContent(this.getCallContent2());
						sys2.setIsCorper(this.getIsCorper2());
						sys2.setIsLocked(this.getIsLocked2());
						this.utilService.update(sys2);
					}
				}
				if (null != this.getId3() && !"".equals(this.getId3())) {
					sys3 = (TbOaSystemCall) this.utilService.getObjectById(TbOaSystemCall.class, this.getId3());
					if (null != sys3) {
						sys3.setEndTime(this.getEndTime3());
						sys3.setCallType(this.getCallType3());
						sys3.setCallNums(this.getCallNums3());
						sys3.setCallAtTime(this.getCallAtTime3());
						sys3.setCallContent(this.getCallContent3());
						sys3.setIsCorper(this.getIsCorper3());
						sys3.setIsLocked(this.getIsLocked3());
						this.utilService.update(sys3);
					}
				}
				this.setEditOk(true);
				return this.sysCallShow();
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中sysSendOrUpdate()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 个人提醒汇总
	 * 
	 * @return
	 */
	public String callList() {
		String key = "";
		String userKey = "";
		TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
		try {
			Long userGrade = user.getTbUserGrade().getId();
			if (!(userGrade == 0) && !(userGrade == 1) && !(userGrade == 2)) {
				if ((userGrade == 4) || (userGrade == 3)) {
					if (!"信息科".equals(user.getTbUserDept().getDeptName()) && !"信息处".equals(user.getTbUserDept().getDeptName())) {
						this.setTip("你无此权限！");
						return "tips";
					}
				} else {
					this.setTip("你无此权限！");
					return "tips";
				}
			}
			decodeKey(); // 解码
			List callSize = this.callService.loadPerCallList(key, this.getCallTypes(), this.getBeginTime(), this.getEndTime(), userKey, getQuaryHqlHzList(), "1", 0, 0);
			if (null != callSize) {
				rowCount = Integer.parseInt(callSize.get(0).toString());
			}
			this.setPagingParameters();
			this.setPerCallList(this.callService.loadPerCallList(key, this.getCallTypes(), this.getBeginTime(), this.getEndTime(), userKey, getQuaryHqlHzList(), "1", page.getStartRow(), page.getSize()));
			this.setGradeList((List) this.contextPvd.getServletContextAttr(Util.USER_GRADE_LIST));// 用户级别
			this.setRoleList(this.systemService.getRoleList("0", 0, -1));// 角色列表
			this.setResult("call_per_hzlist");
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中callList()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 得到查询hql语句user
	 * 
	 * @return
	 */
	public String getQuaryHqlHzList() {
		StringBuilder hql = new StringBuilder("");
		if (null != this.cGrade && this.cGrade.length() > 0) {
			hql.append(" and pc.tbUser.tbUserGrade.id=" + this.cGrade);
		}
		if (null != this.cUnit && this.cUnit.length() > 0) {
			hql.append(" and pc.tbUser.tbUserUnit.id=" + this.cUnit);
		}
		if (null != this.cDept && this.cDept.length() > 0) {
			hql.append(" and pc.tbUser.tbUserDept.id=" + this.cDept);
		}
		if (null != this.cRole && this.cRole.length() > 0) {
			hql.append(" and pc.tbUser.tbUserRole.id=" + this.cRole);
		}
		return hql.toString();
	}

	/**
	 * 汇总提醒详细信息查看
	 * 
	 * @return
	 */
	public String callShow() {
		TbOaPersonCall call = null;
		try {
			this.setKeyWord(this.contextPvd.encode(this.contextPvd.decode(this.getKeyWord())));
			this.setKeyUser(this.contextPvd.encode(this.contextPvd.decode(this.getKeyUser())));
			if (null != this.getId() && !"".equals(this.getId())) {
				call = (TbOaPersonCall) this.utilService.getObjectById(TbOaPersonCall.class, this.getId());

				if (call.getTbUser().getTbUserDept() != null && call.getTbUser().getTbUserDept().getId() != null) {
					call.getTbUser().setTbUserDept((TbUserDept) this.utilService.getObjectById(TbUserDept.class, call.getTbUser().getTbUserDept().getId()));
				}
				if (call.getTbUser().getTbUserUnit() != null && call.getTbUser().getTbUserUnit().getId() != null) {
					call.getTbUser().setTbUserUnit((TbUserDept) this.utilService.getObjectById(TbUserDept.class, call.getTbUser().getTbUserUnit().getId()));
				}
				this.setPerCall(call);
				// 被提醒人（管理员）
				if (null != call.getCallAddsUser() && !"".equals(call.getCallAddsUser())) {
					this.setUserNamesList((List<TbUser>) this.utilService.getHqlQuery("from TbUser user where user.id in(" + call.getCallAddsUser() + ")"));
				}
				// 被提醒人（企业）
				if (null != call.getCallAddsCorp() && !"".equals(call.getCallAddsCorp())) {
					this.setCorpNamesList((List<TbCorpInfo>) this.utilService.getHqlQuery("from TbCorpInfo corp where corp.id in(" + call.getCallAddsCorp() + ")"));
				}
				this.setResult("call_per_hzshow");
				return SUCCESS;
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("CallAction类中callShow()方法：" + e.getMessage());
		}
		return ERROR;
	}

	// 新增方法(Song)
	public String getCallList() {
		TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
		try {
			List list = this.callService.loadCallMsgList(null, this.getBeginTime(), this.getEndTime(), user, "0", 0, 0);
			if (list != null) {
				this.setCallSize(list.get(0).toString());
			}
			this.setCallMsgList(this.callService.loadCallMsgList(null, beginTime, endTime, user, "0", 0, 20));
			this.setResult("welcome_xitongtixing");
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.info("CallAction类中getCallInList()方法：" + e.getMessage());
		}
		return ERROR;
	}

	/**
	 * 查询所有收件人列表
	 * 
	 * @return
	 */
	public String userList() {
		try {
			decodeKey(); // 解码
			int rowCount = 0;
			int num = (this.num != null && !"".equals(this.num)) ? Integer.parseInt(this.num) : 1;
			int size = (this.size != null && !"".equals(this.size)) ? Integer.parseInt(this.size) : 5;
			String hql = this.getQuaryHql();
			List objSize;
			objSize = this.systemService.getUserList(hql, 0, 0);
			if (objSize != null && objSize.size() > 0) {
				rowCount = Integer.parseInt(objSize.get(0).toString());
			}
			Page page = new Page(size, num, rowCount);
			this.setPage(page);
			hql += "order by t.gradeId,t.unitId,t.deptId";
			this.setUserList(this.systemService.getUserList(hql, page.getStartRow(), page.getSize()));
			this.setGradeList((List) this.contextPvd.getServletContextAttr(Util.USER_GRADE_LIST));// 用户级别
			this.setRoleList(this.systemService.getRoleList("0", 0, -1));// 角色列表
			this.setZwList(SystemBean.getZwList());
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("MailAction中userList()方法：" + e);
		}
		setResult("call_user_list");
		return "success";
	}

	/**
	 * 得到查询hql语句user
	 * 
	 * @return
	 */
	public String getQuaryHql() {
		StringBuilder hql = new StringBuilder(" where 1=1 ");
		if (null != this.keyWord && this.keyWord.length() > 0) {
			hql.append(" and t.userName like '%" + keyWord + "%'");
		}
		if (null != this.cGrade && this.cGrade.length() > 0) {
			hql.append(" and t.gradeId=" + this.cGrade);
		}
		if (null != this.cUnit && this.cUnit.length() > 0) {
			hql.append(" and t.unitId=" + this.cUnit);
		}
		if (null != this.cDept && this.cDept.length() > 0) {
			hql.append(" and t.deptId=" + this.cDept);
		}
		if (null != this.cRole && this.cRole.length() > 0) {
			hql.append(" and t.roleId=" + this.cRole);
		}
		if (null != this.cZw && this.cZw.length() > 0) {
			hql.append(" and t.userZw=" + this.cZw);
		}
		return hql.toString();
	}

	/**
	 * 查询企业列表
	 * 
	 * @return
	 */
	public String corpList() {
		try {
			TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
			int rowCount = 0;
			int num = (this.num != null && !"".equals(this.num)) ? Integer.parseInt(this.num) : 1;
			int size = (this.size != null && !"".equals(this.size)) ? Integer.parseInt(this.size) : 5;
			String orderHql = "";// 排序hql语句
			String hql = this.getQuaryHqlCorp();
			List objSize = this.enterprisService.getCorpList(hql, null, 0, 0);
			if (objSize != null && objSize.size() > 0) {
				rowCount = Integer.parseInt(objSize.get(0).toString());
			}
			Page page = new Page(size, num, rowCount);
			this.setPage(page);
			this.setCorpList(this.enterprisService.getCorpList(hql, orderHql, page.getStartRow(), page.getSize()));
			this.setSdList(this.enterprisService.getSdList((List)this.contextPvd.getServletContextAttr(Util.QU_DEPT_LIST),user));
			this.setTypeList(this.enterprisService.getTypeList(user));
			this.setHyList((List)this.contextPvd.getServletContextAttr(Util.HY_DEPT_LIST));
			this.setResult("call_corp_list");
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("enterprise: CorpInfoAction:list() 异常：" + e.getMessage());
		}
		return ERROR;
	}

	public String getQuaryHqlCorp() {
			TbUser user = (TbUser)this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
			String grade = user.getTbUserGrade().getId().toString();//用户级别
			TbUserDept unit = null;//用户单位
			TbUserDept dept = null;//用户部门
			if(null!=user.getTbUserUnit()){
				unit = user.getTbUserUnit();
			}
			if(null!=user.getTbUserDept()){
				dept = user.getTbUserDept();
			}
			StringBuilder urls = new StringBuilder("");
			StringBuilder hql = new StringBuilder(" where 1=1 ");
			String key = "";
			if(null!=this.keyWord && this.keyWord.length()>0){
				if(null!=this.getSearch() && "1".equals(this.getSearch())){
					key = this.getKeyWord().trim();
				}else{
					key = this.contextPvd.decode(this.getKeyWord());	
				}
				this.setKeyWord(key);
				hql.append(" and t.corpName like '%"+key+"%'");
				urls.append("keyWord="+this.contextPvd.encode(this.keyWord));
			}else{
				urls.append("keyWord=");
			}
			
			if("3".equals(grade) && "3".equals(dept.getDeptClass())){//市科室行业部门
				hql.append(" and t.deptMainId="+dept.getId());
				urls.append("&cHy="+dept.getId().toString());
				this.setCHy(dept.getId().toString());
				if(null!=this.cMaxType && this.cMaxType.length()>0){
					hql.append(" and t.maxTypeId="+this.cMaxType);
					urls.append("&cMaxType="+this.cMaxType);
				}
				if(null!=this.cMinType && this.cMinType.length()>0){
					hql.append(" and t.minTypeId="+this.cMinType);
					urls.append("&cMinType="+this.cMinType);
				}
			}else if("4".equals(grade) && "3".equals(dept.getDeptClass())){//县区科室行业部门
				if((null==this.cMaxType || "".equals(this.cMaxType)) && (null==this.cMinType || "".equals(this.cMinType))){
					hql.append(" and t.quDeptIds like '%"+dept.getId()+"%'");
				}else{
					if(null!=this.cMaxType && this.cMaxType.length()>0){
						hql.append(" and t.maxTypeId="+this.cMaxType);
						urls.append("&cMaxType="+this.cMaxType);
					}
					if(null!=this.cMinType && this.cMinType.length()>0){
						hql.append(" and t.minTypeId="+this.cMinType);
						urls.append("&cMinType="+this.cMinType);
					}
				}
				if(null!=this.cHy && this.cHy.length()>0){
					hql.append(" and t.deptMainId="+this.cHy);
					urls.append("&cHy="+this.cHy);
				}
			}else if("5".equals(grade)){//市行业
				if("1".equals(unit.getDeptClass())){//行业监管
					hql.append(" and t.deptMainId="+unit.getId());
					urls.append("&cHy="+unit.getId().toString());
					this.setCHy(unit.getId().toString());
				}else{//专业监管
					if("5310".equals(unit.getId().toString())){//质监局
						hql.append(" and t.corpIsTeshe=1");
					}else if("5311".equals(unit.getId().toString())){//消防局
						
					}else if("5312".equals(unit.getId().toString())){//气象局
						hql.append(" and t.corpIsBlzh=1");
					}
					if(null!=this.cHy && this.cHy.length()>0){
						hql.append(" and t.deptMainId="+this.cHy);
						urls.append("&cHy="+this.cHy);
					}
				}
				if(null!=this.cMaxType && this.cMaxType.length()>0){
					hql.append(" and t.maxTypeId="+this.cMaxType);
					urls.append("&cMaxType="+this.cMaxType);
				}
				if(null!=this.cMinType && this.cMinType.length()>0){
					hql.append(" and t.minTypeId="+this.cMinType);
					urls.append("&cMinType="+this.cMinType);
				}
			}else if("6".equals(grade)){//区行业
				if("1".equals(dept.getDeptClass())){
					hql.append(" and t.deptMainId="+dept.getDeptSj());
					urls.append("&cHy="+dept.getDeptSj().toString());
					this.setCHy(dept.getDeptSj().toString());
				}else{
					if("5310".equals(dept.getDeptSj().toString())){//质监局
						hql.append(" and t.corpIsTeshe=1");
					}else if("5311".equals(dept.getDeptSj().toString())){//消防局
						
					}else if("5312".equals(dept.getDeptSj().toString())){//气象局
						hql.append(" and t.corpIsBlzh=1");
					}
					if(null!=this.cHy && this.cHy.length()>0){
						hql.append(" and t.deptMainId="+this.cHy);
						urls.append("&cHy="+this.cHy);
					}
				}
				if(null!=this.cMaxType && this.cMaxType.length()>0){
					hql.append(" and t.maxTypeId="+this.cMaxType);
					urls.append("&cMaxType="+this.cMaxType);
				}
				if(null!=this.cMinType && this.cMinType.length()>0){
					hql.append(" and t.minTypeId="+this.cMinType);
					urls.append("&cMinType="+this.cMinType);
				}
			}else{//其他用户
				if(null!=this.cMaxType && this.cMaxType.length()>0){
					hql.append(" and t.maxTypeId="+this.cMaxType);
					urls.append("&cMaxType="+this.cMaxType);
				}
				if(null!=this.cMinType && this.cMinType.length()>0){
					hql.append(" and t.minTypeId="+this.cMinType);
					urls.append("&cMinType="+this.cMinType);
				}
				if(null!=this.cHy && this.cHy.length()>0){
					hql.append(" and t.deptMainId="+this.cHy);
					urls.append("&cHy="+this.cHy);
				}
			}
			
			if("4".equals(grade) || "6".equals(grade) || "8".equals(grade)){//县区安委会、区科室、区行业
				hql.append(" and t.countyId="+unit.getId());
				this.setCCounty(unit.getId().toString());
				if(null!=this.cUnit && this.cUnit.length()>0){
					hql.append(" and t.unitId="+this.cUnit);
					urls.append("&cUnit="+this.cUnit);
				}
				if(null!=this.cDept && this.cDept.length()>0){
					hql.append(" and t.deptId="+this.cDept);
					urls.append("&cDept="+this.cDept);
				}
			}else if("7".equals(grade)){//属地
				hql.append(" and t.countyId="+unit.getId()+" and t.unitId="+dept.getId());
				this.setCCounty(unit.getId().toString());
				this.setCUnit(dept.getId().toString());
				if(null!=this.cDept && this.cDept.length()>0){
					hql.append(" and t.deptId="+this.cDept);
					urls.append("&cDept="+this.cDept);
				}
			}else{
				if(null!=this.cCounty && this.cCounty.length()>0){
					hql.append(" and t.countyId="+this.cCounty);
					urls.append("&cCounty="+this.cCounty);
				}
				if(null!=this.cUnit && this.cUnit.length()>0){
					hql.append(" and t.unitId="+this.cUnit);
					urls.append("&cUnit="+this.cUnit);
				}
				if(null!=this.cDept && this.cDept.length()>0){
					hql.append(" and t.deptId="+this.cDept);
					urls.append("&cDept="+this.cDept);
				}
			}
			if(null!=this.cZcType && this.cZcType.length()>0){
				hql.append(" and t.corpReportType="+this.cZcType);
				urls.append("&cZcType="+this.cZcType);
			}
			if(null!=this.cGrade && this.cGrade.length()>0){
				if("E".equals(this.cGrade)){
					hql.append(" and t.corpGrade is null");
				}else{
					hql.append(" and t.corpGrade='"+this.cGrade+"'");
				}
				urls.append("&cGrade="+this.cGrade);
			}
			hql.append(" and t.isDele=0 and t.corpSize=1");
			this.setUrls(urls.toString());
			return hql.toString();
		}

	// 获取 未读 消息个数
	public void getNotRead() {
		TbUser user = (TbUser) this.contextPvd.getSessionAttr(Util.SESSION_ADMINUSER);
		try {
			int size = this.callService.getNotReadCallSize(user);
			this.contextPvd.getResponse().getWriter().print(size);
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.info("CallAction中getNotRead()方法：+" + e);
		}
	}

	public List<TbOaPersonCall> getPerCallList() {
		return perCallList;
	}

	public void setPerCallList(List<TbOaPersonCall> perCallList) {
		this.perCallList = perCallList;
	}

	public String getStr_num() {
		return str_num;
	}

	public void setStr_num(String strNum) {
		str_num = strNum;
	}

	public String getStr_size() {
		return str_size;
	}

	public void setStr_size(String strSize) {
		str_size = strSize;
	}

	public String getKeyWord() {
		return keyWord;
	}

	public void setKeyWord(String keyWord) {
		this.keyWord = keyWord;
	}

	public String getSearch() {
		return search;
	}

	public void setSearch(String search) {
		this.search = search;
	}

	public String getKeyTime() {
		return keyTime;
	}

	public void setKeyTime(String keyTime) {
		this.keyTime = keyTime;
	}

	public String getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getAddUser() {
		return addUser;
	}

	public void setAddUser(String addUser) {
		this.addUser = addUser;
	}

	public String getAddCorp() {
		return addCorp;
	}

	public void setAddCorp(String addCorp) {
		this.addCorp = addCorp;
	}

	public String getCallContent() {
		return callContent;
	}

	public void setCallContent(String callContent) {
		this.callContent = callContent;
	}

	public String getNoteDay() {
		return noteDay;
	}

	public void setNoteDay(String noteDay) {
		this.noteDay = noteDay;
	}

	public String getNoteHour() {
		return noteHour;
	}

	public void setNoteHour(String noteHour) {
		this.noteHour = noteHour;
	}

	public String getNoteSec() {
		return noteSec;
	}

	public void setNoteSec(String noteSec) {
		this.noteSec = noteSec;
	}

	public String getCallNums() {
		return callNums;
	}

	public void setCallNums(String callNums) {
		this.callNums = callNums;
	}

	public String getCallAtTime() {
		return callAtTime;
	}

	public void setCallAtTime(String callAtTime) {
		this.callAtTime = callAtTime;
	}

	public Long getCallId() {
		return callId;
	}

	public void setCallId(Long callId) {
		this.callId = callId;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public List<TbOaSystemCall> getSysCallList() {
		return sysCallList;
	}

	public void setSysCallList(List<TbOaSystemCall> sysCallList) {
		this.sysCallList = sysCallList;
	}

	public TbOaSystemCall getSysCall() {
		return sysCall;
	}

	public void setSysCall(TbOaSystemCall sysCall) {
		this.sysCall = sysCall;
	}

	public TbOaSystemCall getSysCall2() {
		return sysCall2;
	}

	public void setSysCall2(TbOaSystemCall sysCall2) {
		this.sysCall2 = sysCall2;
	}

	public TbOaSystemCall getSysCall3() {
		return sysCall3;
	}

	public void setSysCall3(TbOaSystemCall sysCall3) {
		this.sysCall3 = sysCall3;
	}

	public Long getId2() {
		return id2;
	}

	public void setId2(Long id2) {
		this.id2 = id2;
	}

	public Long getId3() {
		return id3;
	}

	public void setId3(Long id3) {
		this.id3 = id3;
	}

	public String getCallType() {
		return callType;
	}

	public void setCallType(String callType) {
		this.callType = callType;
	}

	public boolean isEditOk() {
		return editOk;
	}

	public void setEditOk(boolean editOk) {
		this.editOk = editOk;
	}

	public String getCallType2() {
		return callType2;
	}

	public void setCallType2(String callType2) {
		this.callType2 = callType2;
	}

	public String getCallType3() {
		return callType3;
	}

	public void setCallType3(String callType3) {
		this.callType3 = callType3;
	}

	public String getEndTime2() {
		return endTime2;
	}

	public void setEndTime2(String endTime2) {
		this.endTime2 = endTime2;
	}

	public String getEndTime3() {
		return endTime3;
	}

	public void setEndTime3(String endTime3) {
		this.endTime3 = endTime3;
	}

	public String getCallNums2() {
		return callNums2;
	}

	public void setCallNums2(String callNums2) {
		this.callNums2 = callNums2;
	}

	public String getCallNums3() {
		return callNums3;
	}

	public void setCallNums3(String callNums3) {
		this.callNums3 = callNums3;
	}

	public String getCallAtTime2() {
		return callAtTime2;
	}

	public void setCallAtTime2(String callAtTime2) {
		this.callAtTime2 = callAtTime2;
	}

	public String getCallAtTime3() {
		return callAtTime3;
	}

	public void setCallAtTime3(String callAtTime3) {
		this.callAtTime3 = callAtTime3;
	}

	public String getCallContent2() {
		return callContent2;
	}

	public void setCallContent2(String callContent2) {
		this.callContent2 = callContent2;
	}

	public String getCallContent3() {
		return callContent3;
	}

	public void setCallContent3(String callContent3) {
		this.callContent3 = callContent3;
	}

	public String getCorpSelect() {
		return corpSelect;
	}

	public void setCorpSelect(String corpSelect) {
		this.corpSelect = corpSelect;
	}

	public String getCallTime() {
		return callTime;
	}

	public void setCallTime(String callTime) {
		this.callTime = callTime;
	}

	public List<TbOaCallMsgView> getCallMsgList() {
		return callMsgList;
	}

	public void setCallMsgList(List<TbOaCallMsgView> callMsgList) {
		this.callMsgList = callMsgList;
	}

	public String getForward() {
		return forward;
	}

	public void setForward(String forward) {
		this.forward = forward;
	}

	public String getIsSend() {
		return isSend;
	}

	public void setIsSend(String isSend) {
		this.isSend = isSend;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}

	public boolean isDeleOk() {
		return deleOk;
	}

	public void setDeleOk(boolean deleOk) {
		this.deleOk = deleOk;
	}

	public TbOaPersonCall getPerCall() {
		return perCall;
	}

	public void setPerCall(TbOaPersonCall perCall) {
		this.perCall = perCall;
	}

	public List<TbUser> getUserNamesList() {
		return userNamesList;
	}

	public void setUserNamesList(List<TbUser> userNamesList) {
		this.userNamesList = userNamesList;
	}

	public List<TbCorpInfo> getCorpNamesList() {
		return corpNamesList;
	}

	public void setCorpNamesList(List<TbCorpInfo> corpNamesList) {
		this.corpNamesList = corpNamesList;
	}

	public String getIsSends() {
		return isSends;
	}

	public void setIsSends(String isSends) {
		this.isSends = isSends;
	}

	public String getForType() {
		return forType;
	}

	public void setForType(String forType) {
		this.forType = forType;
	}

	public TbOaCallMsg getCallMsg() {
		return callMsg;
	}

	public void setCallMsg(TbOaCallMsg callMsg) {
		this.callMsg = callMsg;
	}

	public String getTip() {
		return tip;
	}

	public void setTip(String tip) {
		this.tip = tip;
	}

	public String getCallTypes() {
		return callTypes;
	}

	public void setCallTypes(String callTypes) {
		this.callTypes = callTypes;
	}

	public String getUserDept() {
		return userDept;
	}

	public void setUserDept(String userDept) {
		this.userDept = userDept;
	}

	public String getUserUnit() {
		return userUnit;
	}

	public void setUserUnit(String userUnit) {
		this.userUnit = userUnit;
	}

	public List<TbUserDept> getDeptList() {
		return deptList;
	}

	public void setDeptList(List<TbUserDept> deptList) {
		this.deptList = deptList;
	}

	public String getKeyUser() {
		return keyUser;
	}

	public void setKeyUser(String keyUser) {
		this.keyUser = keyUser;
	}

	public String getTempUser() {
		return tempUser;
	}

	public void setTempUser(String tempUser) {
		this.tempUser = tempUser;
	}

	public String getIsCorper() {
		return isCorper;
	}

	public void setIsCorper(String isCorper) {
		this.isCorper = isCorper;
	}

	public Long getId1() {
		return id1;
	}

	public void setId1(Long id1) {
		this.id1 = id1;
	}

	public String getCallSize() {
		return callSize;
	}

	public void setCallSize(String callSize) {
		this.callSize = callSize;
	}

	public CountBean getCounts() {
		return counts;
	}

	public void setCounts(CountBean counts) {
		this.counts = counts;
	}

	public CountBean getHyNums() {
		return hyNums;
	}

	public void setHyNums(CountBean hyNums) {
		this.hyNums = hyNums;
	}

	public CountBean getKsNums() {
		return ksNums;
	}

	public void setKsNums(CountBean ksNums) {
		this.ksNums = ksNums;
	}

	public CountBean getSdNums() {
		return sdNums;
	}

	public void setSdNums(CountBean sdNums) {
		this.sdNums = sdNums;
	}

	public boolean isUserGrade() {
		return userGrade;
	}

	public void setUserGrade(boolean userGrade) {
		this.userGrade = userGrade;
	}

	public String getIsCorper2() {
		return isCorper2;
	}

	public void setIsCorper2(String isCorper2) {
		this.isCorper2 = isCorper2;
	}

	public String getIsCorper3() {
		return isCorper3;
	}

	public void setIsCorper3(String isCorper3) {
		this.isCorper3 = isCorper3;
	}

	public String getIsLocked() {
		return isLocked;
	}

	public void setIsLocked(String isLocked) {
		this.isLocked = isLocked;
	}

	public String getIsLocked2() {
		return isLocked2;
	}

	public void setIsLocked2(String isLocked2) {
		this.isLocked2 = isLocked2;
	}

	public String getIsLocked3() {
		return isLocked3;
	}

	public void setIsLocked3(String isLocked3) {
		this.isLocked3 = isLocked3;
	}

	public String getCorpGr() {
		return corpGr;
	}

	public void setCorpGr(String corpGr) {
		this.corpGr = corpGr;
	}

	public List<TbCorpInfoView> getCorpList() {
		return corpList;
	}

	public void setCorpList(List<TbCorpInfoView> corpList) {
		this.corpList = corpList;
	}

	public List<TbUserDept> getHyList() {
		return hyList;
	}

	public void setHyList(List<TbUserDept> hyList) {
		this.hyList = hyList;
	}

	public String getHyMax() {
		return hyMax;
	}

	public void setHyMax(String hyMax) {
		this.hyMax = hyMax;
	}

	public String getHyMin() {
		return hyMin;
	}

	public void setHyMin(String hyMin) {
		this.hyMin = hyMin;
	}

	public List<TbUserDept> getSdList() {
		return sdList;
	}

	public void setSdList(List<TbUserDept> sdList) {
		this.sdList = sdList;
	}

	public String getSdMax() {
		return sdMax;
	}

	public void setSdMax(String sdMax) {
		this.sdMax = sdMax;
	}

	public String getSdMin() {
		return sdMin;
	}

	public void setSdMin(String sdMin) {
		this.sdMin = sdMin;
	}

	public List<TbCorpType> getTypeList() {
		return typeList;
	}

	public void setTypeList(List<TbCorpType> typeList) {
		this.typeList = typeList;
	}

	public String getTypeMax() {
		return typeMax;
	}

	public void setTypeMax(String typeMax) {
		this.typeMax = typeMax;
	}

	public String getTypeMin() {
		return typeMin;
	}

	public void setTypeMin(String typeMin) {
		this.typeMin = typeMin;
	}

	public List<TbUserDept> getZyList() {
		return zyList;
	}

	public void setZyList(List<TbUserDept> zyList) {
		this.zyList = zyList;
	}

	public String getZyMax() {
		return zyMax;
	}

	public void setZyMax(String zyMax) {
		this.zyMax = zyMax;
	}

	public String getZyMin() {
		return zyMin;
	}

	public void setZyMin(String zyMin) {
		this.zyMin = zyMin;
	}

	public String getIsUp() {
		return isUp;
	}

	public void setIsUp(String isUp) {
		this.isUp = isUp;
	}

	public String getUpQuarter() {
		return upQuarter;
	}

	public void setUpQuarter(String upQuarter) {
		this.upQuarter = upQuarter;
	}

	public String getUpYear() {
		return upYear;
	}

	public void setUpYear(String upYear) {
		this.upYear = upYear;
	}

	public List<YearBean> getYearList() {
		return yearList;
	}

	public void setYearList(List<YearBean> yearList) {
		this.yearList = yearList;
	}

	public String getReadType() {
		return readType;
	}

	public void setReadType(String readType) {
		this.readType = readType;
	}

	public List<TbOaCallMsg> getMsgUserList() {
		return msgUserList;
	}

	public void setMsgUserList(List<TbOaCallMsg> msgUserList) {
		this.msgUserList = msgUserList;
	}

	public String getStr_num1() {
		return str_num1;
	}

	public void setStr_num1(String str_num1) {
		this.str_num1 = str_num1;
	}

	public String getStr_size1() {
		return str_size1;
	}

	public void setStr_size1(String str_size1) {
		this.str_size1 = str_size1;
	}

	public CountBean getHyInNums() {
		return hyInNums;
	}

	public void setHyInNums(CountBean hyInNums) {
		this.hyInNums = hyInNums;
	}

	public CountBean getSdInNums() {
		return sdInNums;
	}

	public void setSdInNums(CountBean sdInNums) {
		this.sdInNums = sdInNums;
	}

	public CountBean getKsInNums() {
		return ksInNums;
	}

	public void setKsInNums(CountBean ksInNums) {
		this.ksInNums = ksInNums;
	}

	public CountBean getUserCallInNums() {
		return userCallInNums;
	}

	public void setUserCallInNums(CountBean userCallInNums) {
		this.userCallInNums = userCallInNums;
	}

	public String getUpType() {
		return upType;
	}

	public void setUpType(String upType) {
		this.upType = upType;
	}

	public List<TbUserGrade> getGradeList() {
		return gradeList;
	}

	public void setGradeList(List<TbUserGrade> gradeList) {
		this.gradeList = gradeList;
	}

	public List<TbUser> getUserList() {
		return userList;
	}

	public void setUserList(List<TbUser> userList) {
		this.userList = userList;
	}

	public List getZwList() {
		return zwList;
	}

	public void setZwList(List zwList) {
		this.zwList = zwList;
	}

	public List getRoleList() {
		return roleList;
	}

	public void setRoleList(List roleList) {
		this.roleList = roleList;
	}

	public String getCCounty() {
		return cCounty;
	}

	public void setCCounty(String county) {
		cCounty = county;
	}

	public String getCDept() {
		return cDept;
	}

	public void setCDept(String dept) {
		cDept = dept;
	}

	public String getCGrade() {
		return cGrade;
	}

	public void setCGrade(String grade) {
		cGrade = grade;
	}

	public String getCHy() {
		return cHy;
	}

	public void setCHy(String hy) {
		cHy = hy;
	}

	public String getCMaxType() {
		return cMaxType;
	}

	public void setCMaxType(String maxType) {
		cMaxType = maxType;
	}

	public String getCMinType() {
		return cMinType;
	}

	public void setCMinType(String minType) {
		cMinType = minType;
	}

	public String getCRole() {
		return cRole;
	}

	public void setCRole(String role) {
		cRole = role;
	}

	public String getCUnit() {
		return cUnit;
	}

	public void setCUnit(String unit) {
		cUnit = unit;
	}

	public String getCZw() {
		return cZw;
	}

	public void setCZw(String zw) {
		cZw = zw;
	}

	public SimpleDateFormat getSdf() {
		return sdf;
	}

	public void setSdf(SimpleDateFormat sdf) {
		this.sdf = sdf;
	}

	public SimpleDateFormat getSdf2() {
		return sdf2;
	}

	public void setSdf2(SimpleDateFormat sdf2) {
		this.sdf2 = sdf2;
	}

	public String getNum1() {
		return num1;
	}

	public void setNum1(String num1) {
		this.num1 = num1;
	}

	public String getSize1() {
		return size1;
	}

	public void setSize1(String size1) {
		this.size1 = size1;
	}

	public String getCZcType() {
		return cZcType;
	}

	public void setCZcType(String zcType) {
		cZcType = zcType;
	}

	public String getUrls() {
		return urls;
	}

	public void setUrls(String urls) {
		this.urls = urls;
	}

}
